package io.github.smileinmotion.oplog.config;

import io.github.smileinmotion.oplog.service.IOpLogCallService;
import io.github.smileinmotion.oplog.service.impl.DefaultOpLogCallServiceImpl;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * OperLog 操作日志配置
 *
 * @author Mr.spc
 * @date 2022/5/1 22:33
 */
@Data
@ConfigurationProperties(prefix = "concise.log")
public class OpLogProperties {

    /**
     * 日志启用开关: true：开启（默认），false: 关闭
     */
    private boolean enable = true;

    /**
     * 平台：不同服务使用的区分，默认取spring.application.name
     */
    @Value("${spring.application.name:#{null}}")
    private String platform;


    /**
     * 日志回调
     */
    private Class<? extends IOpLogCallService> opLogServiceImpl = DefaultOpLogCallServiceImpl.class;

}
